package com.example.fufudamowang.music;

import android.app.Service;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.IBinder;
import android.support.annotation.Nullable;

/**
 * Created by fufudamowang on 2018/6/18.
 */

public  class music extends Service{
    private MediaPlayer player;

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
    public void onStart(Intent intent,int startId){
        super.onStart(intent,startId);
        player =MediaPlayer.create(this,R.raw.aaa);
        player.start();
    }
    public void onDestroy(){
        super.onDestroy();
        player.stop();
    }
}
